import pug from "pug";
import path from "path";

const base = path.join(process.cwd(), "doctype");

console.log(pug.renderFile(base + "/index.pug"));

// doctype 选项
const source = 'img(src="foo.png")';
console.log(pug.render(source));
// <img src="foo.png"/>
console.log(pug.render(source, { doctype: "xml" }));
// <img src="foo.png"></img>
console.log(pug.render(source, { doctype: "html" }));
// <img src="foo.png">
